package com.yxch.admin.controller.comment;

import com.yxch.admin.model.comment.CommentDTO;
import com.yxch.admin.model.comment.PostDTO;
import com.yxch.admin.service.comment.CommentService;
import com.yxch.admin.utils.ResultAPI;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("/yxch/admin/comment")
public class CommentController {
    @Autowired
    private CommentService commentService;

    @GetMapping
    ResultAPI getComments(CommentDTO commentDTO) {
        return commentService.getComments(commentDTO);
    }

    @DeleteMapping("{ids}")
    ResultAPI deleteComments(@PathVariable("ids") List<Integer> ids) {
        return commentService.deleteComments(ids);
    }


}
